/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.util.ObjectUtil
 *  cn.hutool.core.util.StrUtil
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.beans.value.ChangeListener
 *  javafx.beans.value.ObservableValue
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.ComboBox
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.scene.layout.AnchorPane
 *  javafx.stage.Modality
 *  javafx.util.Callback
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.incomeStatement;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.gys.GysApplication;
import com.gys.common.business.IncomeStatementUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.util.CommonUtil;
import com.gys.controller.BaseController;
import com.gys.controller.incomeStatement.ChooseProController;
import com.gys.controller.incomeStatement.IncomeStatementController;
import com.gys.data.accept.ProductOutData;
import com.gys.data.incomeStatement.IncomeStatementDetailOutData;
import com.gys.data.incomeStatement.IncomeStatementOutData;
import com.gys.data.medCheck.GsmchType;
import com.gys.view.incomeStatement.ChoosePro;
import de.felixroske.jfxsupport.FXMLController;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Modality;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class AddIncomeStatementController
extends BaseController
implements Initializable {
    @FXML
    private Button cancel;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdRetailPrice;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdDosageForm;
    @FXML
    private Button save;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdBatch;
    @FXML
    private TextField remark;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdFormat;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdApprovalNum;
    @FXML
    private Button addBtn;
    @FXML
    private ComboBox<GsmchType> isType;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdBatchNo;
    @FXML
    private AnchorPane pane;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> indexDetail;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdRealQty;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdOrigin;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdValidUntil;
    @FXML
    private TableView<IncomeStatementDetailOutData> tableView;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdProId;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdProName;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdStockStatus;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdFactory;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdUnit;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdIsCause;
    @FXML
    private TableColumn<IncomeStatementDetailOutData, String> gsisdQty;
    @Autowired
    private IncomeStatementController incomeStatementController;
    @Autowired
    private ChooseProController chooseProController;
    private ObservableList<IncomeStatementDetailOutData> observableTableList = FXCollections.observableArrayList(new ArrayList());

    public void initialize(URL location, ResourceBundle resources) {
        this.init();
    }

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.pane)) {
            return;
        }
        this.observableTableList.clear();
        this.initPane();
    }

    private void initPane() {
        if (ObjectUtil.isNotEmpty(this.addBtn)) {
            this.isType.getItems().clear();
            this.remark.clear();
        }
        this.isType.getItems().addAll(this.getAllType());
        this.isType.converterProperty().set(new StringConverter<GsmchType>(){

            public String toString(GsmchType object) {
                return object.getName();
            }

            public GsmchType fromString(String string) {
                return null;
            }
        });
    }

    @FXML
    void sureAction() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        String isTypeId = ((GsmchType)this.isType.getValue()).getCode();
        String remarks = this.remark.getText().trim();
        if (ObjectUtil.isEmpty(isTypeId)) {
            alert.setContentText("\u8bf7\u9009\u62e9\u635f\u76ca\u7c7b\u578b");
            alert.showAndWait();
            return;
        }
        if (StrUtil.isNotBlank((CharSequence)remarks) && remarks.length() > 30) {
            alert.setContentText("\u5907\u6ce8\u957f\u5ea6\u4e0d\u8d85\u8fc730\u4f4d");
            alert.showAndWait();
            return;
        }
        if (this.observableTableList.size() == 0) {
            alert.setContentText("\u8bf7\u6dfb\u52a0\u5546\u54c1");
            alert.showAndWait();
            return;
        }
        for (int i = 0; i < this.observableTableList.size(); ++i) {
            IncomeStatementDetailOutData detail = (IncomeStatementDetailOutData)this.observableTableList.get(i);
            if (StrUtil.isBlank((CharSequence)detail.getGsisdRealQty())) {
                alert.setContentText(StrUtil.format((CharSequence)"\u7b2c{}\u884c\u5546\u54c1\u8bf7\u586b\u5199\u5b9e\u9645\u6570\u91cf", (Object[])new Object[]{i + 1}));
                alert.showAndWait();
                return;
            }
            if (StrUtil.isBlank((CharSequence)detail.getGsisdIsCause())) {
                alert.setContentText(StrUtil.format((CharSequence)"\u7b2c{}\u884c\u5546\u54c1\u8bf7\u586b\u5199\u635f\u76ca\u539f\u56e0", (Object[])new Object[]{i + 1}));
                alert.showAndWait();
                return;
            }
            if (detail.getGsisdIsCause().length() > 10) {
                alert.setContentText(StrUtil.format((CharSequence)"\u7b2c{}\u884c\u5546\u54c1\u635f\u76ca\u539f\u56e0\u957f\u5ea6\u4e0d\u8d85\u8fc710\u4f4d", (Object[])new Object[]{i + 1}));
                alert.showAndWait();
                return;
            }
            detail.setGsisdIsQty(StrUtil.toString((Integer.valueOf(detail.getGsisdRealQty()) - Integer.valueOf(detail.getGsisdQty()))));
        }
        if ("2".equals(isTypeId)) {
            HashMap<String, String> proMap = new HashMap<String, String>();
            HashMap<String, String> batchMap = new HashMap<String, String>();
            for (IncomeStatementDetailOutData detail : this.observableTableList) {
                proMap.put(detail.getGsisdProId(), "1");
                if (proMap.size() > 1) {
                    alert.setContentText("\u4f7f\u7528\u6279\u53f7\u8c03\u6574\u529f\u80fd\uff0c\u53ea\u80fd\u9009\u62e9\u540c\u4e00\u4e2a\u5546\u54c1");
                    alert.showAndWait();
                    return;
                }
                batchMap.put(detail.getGsisdBatchNo(), "1");
            }
            if (batchMap.size() < 2) {
                alert.setContentText("\u4f7f\u7528\u6279\u53f7\u8c03\u6574\u529f\u80fd\uff0c\u81f3\u5c11\u9700\u8981\u9009\u62e9\u4e24\u4e2a\u4e0d\u540c\u7684\u6279\u53f7");
                alert.showAndWait();
                return;
            }
            int total = 0;
            int realTotal = 0;
            for (IncomeStatementDetailOutData detail : this.observableTableList) {
                total += Integer.valueOf(detail.getGsisdQty()).intValue();
                realTotal += Integer.valueOf(detail.getGsisdRealQty()).intValue();
            }
            if (total != realTotal) {
                alert.setContentText("\u4f7f\u7528\u6279\u53f7\u8c03\u6574\u529f\u80fd\uff0c\u5546\u54c1\u5e93\u5b58\u603b\u6570\u91cf\u4e0d\u53ef\u53d8\u5316");
                alert.showAndWait();
                return;
            }
        }
        IncomeStatementOutData inData = new IncomeStatementOutData();
        inData.setGsishIsType(isTypeId);
        inData.setGsishRemark(remarks);
        inData.setDetailOutDataList((List<IncomeStatementDetailOutData>)this.observableTableList);
        HttpJson httpJson = IncomeStatementUtil.insert(inData);
        if (httpJson.isSuccess()) {
            alert.setContentText("\u4fdd\u5b58\u6210\u529f");
            alert.showAndWait();
            this.cancelAction();
            this.incomeStatementController.initTable();
        } else {
            alert.setContentText(httpJson.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    public TableView<IncomeStatementDetailOutData> addProduct(List<ProductOutData> param) {
        if (param.size() > 0) {
            for (int i = 0; i < param.size(); ++i) {
                IncomeStatementDetailOutData data = new IncomeStatementDetailOutData();
                data.setIndexDetail(i + 1);
                data.setGsisdProId(param.get(i).getProCode());
                data.setGsisdFactory(param.get(i).getProFactoryName());
                data.setGsisdDosageForm(param.get(i).getProForm());
                data.setGsisdProName(param.get(i).getGspgProName());
                data.setGsisdOrigin(param.get(i).getProPlace());
                data.setGsisdApprovalNum(param.get(i).getProRegisterNo());
                data.setGsisdFormat(param.get(i).getGspgSpecs());
                data.setGsisdUnit(param.get(i).getProUnit());
                data.setGsisdRetailPrice(param.get(i).getProPrice());
                data.setGsisdValidUntil(param.get(i).getValidDate());
                data.setGsisdBatch(param.get(i).getBatch());
                data.setGsisdBatchNo(param.get(i).getBatchNo());
                data.setGsisdQty(param.get(i).getStockQty());
                data.setGsisdStockStatus("\u5f85\u5904\u7406");
                this.observableTableList.add(data);
            }
        }
        this.bingDetailTableCell();
        this.changeToTextFieldDEdit(this.gsisdRealQty);
        this.changeToTextFieldDEdit(this.gsisdIsCause);
        this.tableView.setItems(this.observableTableList);
        return this.tableView;
    }

    @FXML
    public void cancelAction() {
        this.observableTableList.clear();
        this.pane.getScene().getWindow().hide();
    }

    @FXML
    void choose() {
        this.chooseProController.init();
        GysApplication.showView(ChoosePro.class, (Modality)Modality.APPLICATION_MODAL);
    }

    private List<GsmchType> getAllType() {
        ArrayList<GsmchType> list = new ArrayList<GsmchType>();
        list.add(new GsmchType("2", "\u6279\u53f7\u8c03\u6574"));
        list.add(new GsmchType("3", "\u4f4e\u503c\u6613\u8017\u54c1\u9886\u7528"));
        list.add(new GsmchType("4", "\u95e8\u5e97\u9886\u7528"));
        return list;
    }

    private void bingDetailTableCell() {
        this.indexDetail.setCellValueFactory((Callback)new PropertyValueFactory(this.indexDetail.getId()));
        this.gsisdProId.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdProId.getId()));
        this.gsisdProName.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdProName.getId()));
        this.gsisdRetailPrice.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdRetailPrice.getId()));
        this.gsisdBatchNo.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdBatchNo.getId()));
        this.gsisdBatch.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdBatch.getId()));
        this.gsisdValidUntil.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdValidUntil.getId()));
        this.gsisdQty.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdQty.getId()));
        this.gsisdRealQty.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdRealQty.getId()));
        this.gsisdIsCause.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdIsCause.getId()));
        this.gsisdFactory.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdFactory.getId()));
        this.gsisdOrigin.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdOrigin.getId()));
        this.gsisdDosageForm.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdDosageForm.getId()));
        this.gsisdUnit.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdUnit.getId()));
        this.gsisdFormat.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdFormat.getId()));
        this.gsisdApprovalNum.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdApprovalNum.getId()));
        this.gsisdStockStatus.setCellValueFactory((Callback)new PropertyValueFactory(this.gsisdStockStatus.getId()));
    }

    public void changeToTextFieldDEdit(TableColumn<IncomeStatementDetailOutData, String> column) {
        column.setCellFactory(tc -> {
            final TextField textField = new TextField();
            textField.setMinHeight(30.0);
            TableCell<IncomeStatementDetailOutData, String> cell = new TableCell<IncomeStatementDetailOutData, String>(){

                protected void updateItem(String chuzhi, boolean empty) {
                    super.updateItem(chuzhi, empty);
                    if (empty) {
                        this.setGraphic(null);
                    } else {
                        textField.setText(chuzhi);
                        this.setGraphic((Node)textField);
                    }
                }
            };
            textField.textProperty().addListener(new ChangeListener(){
                final TableCell val_cell;
                final TextField val_textField;
                {
                    this.val_cell = cell;
                    this.val_textField = textField;
                }

                public void changed(ObservableValue observable, Object oldValue, Object newValue) {
                    int rank = this.val_cell.getIndex();
                    String cloumName = this.val_cell.getId();
                    String value = this.val_textField.getText();
                    IncomeStatementDetailOutData outData = (IncomeStatementDetailOutData)AddIncomeStatementController.this.observableTableList.get(rank);
                    String methodName = CommonUtil.getSetMethod(cloumName);
                    try {
                        Method method = IncomeStatementDetailOutData.class.getMethod(methodName, String.class);
                        method.invoke(outData, value);
                    }
                    catch (Exception ex) {
                        throw new RuntimeException("\u6ca1\u6709\u65b9\u6cd5" + methodName);
                    }
                }
            });
            return cell;
        });
    }

    public Button getCancel() {
        return this.cancel;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdRetailPrice() {
        return this.gsisdRetailPrice;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdDosageForm() {
        return this.gsisdDosageForm;
    }

    public Button getSave() {
        return this.save;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdBatch() {
        return this.gsisdBatch;
    }

    public TextField getRemark() {
        return this.remark;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdFormat() {
        return this.gsisdFormat;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdApprovalNum() {
        return this.gsisdApprovalNum;
    }

    public Button getAddBtn() {
        return this.addBtn;
    }

    public ComboBox<GsmchType> getIsType() {
        return this.isType;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdBatchNo() {
        return this.gsisdBatchNo;
    }

    public AnchorPane getPane() {
        return this.pane;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getIndexDetail() {
        return this.indexDetail;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdRealQty() {
        return this.gsisdRealQty;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdOrigin() {
        return this.gsisdOrigin;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdValidUntil() {
        return this.gsisdValidUntil;
    }

    public TableView<IncomeStatementDetailOutData> getTableView() {
        return this.tableView;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdProId() {
        return this.gsisdProId;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdProName() {
        return this.gsisdProName;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdStockStatus() {
        return this.gsisdStockStatus;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdFactory() {
        return this.gsisdFactory;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdUnit() {
        return this.gsisdUnit;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdIsCause() {
        return this.gsisdIsCause;
    }

    public TableColumn<IncomeStatementDetailOutData, String> getGsisdQty() {
        return this.gsisdQty;
    }

    public IncomeStatementController getIncomeStatementController() {
        return this.incomeStatementController;
    }

    public ChooseProController getChooseProController() {
        return this.chooseProController;
    }

    public ObservableList<IncomeStatementDetailOutData> getObservableTableList() {
        return this.observableTableList;
    }

    public void setCancel(Button cancel) {
        this.cancel = cancel;
    }

    public void setGsisdRetailPrice(TableColumn<IncomeStatementDetailOutData, String> gsisdRetailPrice) {
        this.gsisdRetailPrice = gsisdRetailPrice;
    }

    public void setGsisdDosageForm(TableColumn<IncomeStatementDetailOutData, String> gsisdDosageForm) {
        this.gsisdDosageForm = gsisdDosageForm;
    }

    public void setSave(Button save) {
        this.save = save;
    }

    public void setGsisdBatch(TableColumn<IncomeStatementDetailOutData, String> gsisdBatch) {
        this.gsisdBatch = gsisdBatch;
    }

    public void setRemark(TextField remark) {
        this.remark = remark;
    }

    public void setGsisdFormat(TableColumn<IncomeStatementDetailOutData, String> gsisdFormat) {
        this.gsisdFormat = gsisdFormat;
    }

    public void setGsisdApprovalNum(TableColumn<IncomeStatementDetailOutData, String> gsisdApprovalNum) {
        this.gsisdApprovalNum = gsisdApprovalNum;
    }

    public void setAddBtn(Button addBtn) {
        this.addBtn = addBtn;
    }

    public void setIsType(ComboBox<GsmchType> isType) {
        this.isType = isType;
    }

    public void setGsisdBatchNo(TableColumn<IncomeStatementDetailOutData, String> gsisdBatchNo) {
        this.gsisdBatchNo = gsisdBatchNo;
    }

    public void setPane(AnchorPane pane) {
        this.pane = pane;
    }

    public void setIndexDetail(TableColumn<IncomeStatementDetailOutData, String> indexDetail) {
        this.indexDetail = indexDetail;
    }

    public void setGsisdRealQty(TableColumn<IncomeStatementDetailOutData, String> gsisdRealQty) {
        this.gsisdRealQty = gsisdRealQty;
    }

    public void setGsisdOrigin(TableColumn<IncomeStatementDetailOutData, String> gsisdOrigin) {
        this.gsisdOrigin = gsisdOrigin;
    }

    public void setGsisdValidUntil(TableColumn<IncomeStatementDetailOutData, String> gsisdValidUntil) {
        this.gsisdValidUntil = gsisdValidUntil;
    }

    public void setTableView(TableView<IncomeStatementDetailOutData> tableView) {
        this.tableView = tableView;
    }

    public void setGsisdProId(TableColumn<IncomeStatementDetailOutData, String> gsisdProId) {
        this.gsisdProId = gsisdProId;
    }

    public void setGsisdProName(TableColumn<IncomeStatementDetailOutData, String> gsisdProName) {
        this.gsisdProName = gsisdProName;
    }

    public void setGsisdStockStatus(TableColumn<IncomeStatementDetailOutData, String> gsisdStockStatus) {
        this.gsisdStockStatus = gsisdStockStatus;
    }

    public void setGsisdFactory(TableColumn<IncomeStatementDetailOutData, String> gsisdFactory) {
        this.gsisdFactory = gsisdFactory;
    }

    public void setGsisdUnit(TableColumn<IncomeStatementDetailOutData, String> gsisdUnit) {
        this.gsisdUnit = gsisdUnit;
    }

    public void setGsisdIsCause(TableColumn<IncomeStatementDetailOutData, String> gsisdIsCause) {
        this.gsisdIsCause = gsisdIsCause;
    }

    public void setGsisdQty(TableColumn<IncomeStatementDetailOutData, String> gsisdQty) {
        this.gsisdQty = gsisdQty;
    }

    public void setIncomeStatementController(IncomeStatementController incomeStatementController) {
        this.incomeStatementController = incomeStatementController;
    }

    public void setChooseProController(ChooseProController chooseProController) {
        this.chooseProController = chooseProController;
    }

    public void setObservableTableList(ObservableList<IncomeStatementDetailOutData> observableTableList) {
        this.observableTableList = observableTableList;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof AddIncomeStatementController)) {
            return false;
        }
        AddIncomeStatementController other = (AddIncomeStatementController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        Button this$cancel = this.getCancel();
        Button other$cancel = other.getCancel();
        if (this$cancel == null ? other$cancel != null : !this$cancel.equals(other$cancel)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdRetailPrice = this.getGsisdRetailPrice();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdRetailPrice = other.getGsisdRetailPrice();
        if (this$gsisdRetailPrice == null ? other$gsisdRetailPrice != null : !this$gsisdRetailPrice.equals(other$gsisdRetailPrice)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdDosageForm = this.getGsisdDosageForm();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdDosageForm = other.getGsisdDosageForm();
        if (this$gsisdDosageForm == null ? other$gsisdDosageForm != null : !this$gsisdDosageForm.equals(other$gsisdDosageForm)) {
            return false;
        }
        Button this$save = this.getSave();
        Button other$save = other.getSave();
        if (this$save == null ? other$save != null : !this$save.equals(other$save)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdBatch = this.getGsisdBatch();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdBatch = other.getGsisdBatch();
        if (this$gsisdBatch == null ? other$gsisdBatch != null : !this$gsisdBatch.equals(other$gsisdBatch)) {
            return false;
        }
        TextField this$remark = this.getRemark();
        TextField other$remark = other.getRemark();
        if (this$remark == null ? other$remark != null : !this$remark.equals(other$remark)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdFormat = this.getGsisdFormat();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdFormat = other.getGsisdFormat();
        if (this$gsisdFormat == null ? other$gsisdFormat != null : !this$gsisdFormat.equals(other$gsisdFormat)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdApprovalNum = this.getGsisdApprovalNum();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdApprovalNum = other.getGsisdApprovalNum();
        if (this$gsisdApprovalNum == null ? other$gsisdApprovalNum != null : !this$gsisdApprovalNum.equals(other$gsisdApprovalNum)) {
            return false;
        }
        Button this$addBtn = this.getAddBtn();
        Button other$addBtn = other.getAddBtn();
        if (this$addBtn == null ? other$addBtn != null : !this$addBtn.equals(other$addBtn)) {
            return false;
        }
        ComboBox<GsmchType> this$isType = this.getIsType();
        ComboBox<GsmchType> other$isType = other.getIsType();
        if (this$isType == null ? other$isType != null : !this$isType.equals(other$isType)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdBatchNo = this.getGsisdBatchNo();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdBatchNo = other.getGsisdBatchNo();
        if (this$gsisdBatchNo == null ? other$gsisdBatchNo != null : !this$gsisdBatchNo.equals(other$gsisdBatchNo)) {
            return false;
        }
        AnchorPane this$pane = this.getPane();
        AnchorPane other$pane = other.getPane();
        if (this$pane == null ? other$pane != null : !this$pane.equals(other$pane)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$indexDetail = this.getIndexDetail();
        TableColumn<IncomeStatementDetailOutData, String> other$indexDetail = other.getIndexDetail();
        if (this$indexDetail == null ? other$indexDetail != null : !this$indexDetail.equals(other$indexDetail)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdRealQty = this.getGsisdRealQty();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdRealQty = other.getGsisdRealQty();
        if (this$gsisdRealQty == null ? other$gsisdRealQty != null : !this$gsisdRealQty.equals(other$gsisdRealQty)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdOrigin = this.getGsisdOrigin();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdOrigin = other.getGsisdOrigin();
        if (this$gsisdOrigin == null ? other$gsisdOrigin != null : !this$gsisdOrigin.equals(other$gsisdOrigin)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdValidUntil = this.getGsisdValidUntil();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdValidUntil = other.getGsisdValidUntil();
        if (this$gsisdValidUntil == null ? other$gsisdValidUntil != null : !this$gsisdValidUntil.equals(other$gsisdValidUntil)) {
            return false;
        }
        TableView<IncomeStatementDetailOutData> this$tableView = this.getTableView();
        TableView<IncomeStatementDetailOutData> other$tableView = other.getTableView();
        if (this$tableView == null ? other$tableView != null : !this$tableView.equals(other$tableView)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdProId = this.getGsisdProId();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdProId = other.getGsisdProId();
        if (this$gsisdProId == null ? other$gsisdProId != null : !this$gsisdProId.equals(other$gsisdProId)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdProName = this.getGsisdProName();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdProName = other.getGsisdProName();
        if (this$gsisdProName == null ? other$gsisdProName != null : !this$gsisdProName.equals(other$gsisdProName)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdStockStatus = this.getGsisdStockStatus();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdStockStatus = other.getGsisdStockStatus();
        if (this$gsisdStockStatus == null ? other$gsisdStockStatus != null : !this$gsisdStockStatus.equals(other$gsisdStockStatus)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdFactory = this.getGsisdFactory();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdFactory = other.getGsisdFactory();
        if (this$gsisdFactory == null ? other$gsisdFactory != null : !this$gsisdFactory.equals(other$gsisdFactory)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdUnit = this.getGsisdUnit();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdUnit = other.getGsisdUnit();
        if (this$gsisdUnit == null ? other$gsisdUnit != null : !this$gsisdUnit.equals(other$gsisdUnit)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdIsCause = this.getGsisdIsCause();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdIsCause = other.getGsisdIsCause();
        if (this$gsisdIsCause == null ? other$gsisdIsCause != null : !this$gsisdIsCause.equals(other$gsisdIsCause)) {
            return false;
        }
        TableColumn<IncomeStatementDetailOutData, String> this$gsisdQty = this.getGsisdQty();
        TableColumn<IncomeStatementDetailOutData, String> other$gsisdQty = other.getGsisdQty();
        if (this$gsisdQty == null ? other$gsisdQty != null : !this$gsisdQty.equals(other$gsisdQty)) {
            return false;
        }
        IncomeStatementController this$incomeStatementController = this.getIncomeStatementController();
        IncomeStatementController other$incomeStatementController = other.getIncomeStatementController();
        if (this$incomeStatementController == null ? other$incomeStatementController != null : !(this$incomeStatementController).equals(other$incomeStatementController)) {
            return false;
        }
        ChooseProController this$chooseProController = this.getChooseProController();
        ChooseProController other$chooseProController = other.getChooseProController();
        if (this$chooseProController == null ? other$chooseProController != null : !(this$chooseProController).equals(other$chooseProController)) {
            return false;
        }
        ObservableList<IncomeStatementDetailOutData> this$observableTableList = this.getObservableTableList();
        ObservableList<IncomeStatementDetailOutData> other$observableTableList = other.getObservableTableList();
        return !(this$observableTableList == null ? other$observableTableList != null : !this$observableTableList.equals(other$observableTableList));
    }

    protected boolean canEqual(Object other) {
        return other instanceof AddIncomeStatementController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Button $cancel = this.getCancel();
        result = result * 59 + ($cancel == null ? 43 : $cancel.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdRetailPrice = this.getGsisdRetailPrice();
        result = result * 59 + ($gsisdRetailPrice == null ? 43 : $gsisdRetailPrice.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdDosageForm = this.getGsisdDosageForm();
        result = result * 59 + ($gsisdDosageForm == null ? 43 : $gsisdDosageForm.hashCode());
        Button $save = this.getSave();
        result = result * 59 + ($save == null ? 43 : $save.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdBatch = this.getGsisdBatch();
        result = result * 59 + ($gsisdBatch == null ? 43 : $gsisdBatch.hashCode());
        TextField $remark = this.getRemark();
        result = result * 59 + ($remark == null ? 43 : $remark.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdFormat = this.getGsisdFormat();
        result = result * 59 + ($gsisdFormat == null ? 43 : $gsisdFormat.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdApprovalNum = this.getGsisdApprovalNum();
        result = result * 59 + ($gsisdApprovalNum == null ? 43 : $gsisdApprovalNum.hashCode());
        Button $addBtn = this.getAddBtn();
        result = result * 59 + ($addBtn == null ? 43 : $addBtn.hashCode());
        ComboBox<GsmchType> $isType = this.getIsType();
        result = result * 59 + ($isType == null ? 43 : $isType.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdBatchNo = this.getGsisdBatchNo();
        result = result * 59 + ($gsisdBatchNo == null ? 43 : $gsisdBatchNo.hashCode());
        AnchorPane $pane = this.getPane();
        result = result * 59 + ($pane == null ? 43 : $pane.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $indexDetail = this.getIndexDetail();
        result = result * 59 + ($indexDetail == null ? 43 : $indexDetail.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdRealQty = this.getGsisdRealQty();
        result = result * 59 + ($gsisdRealQty == null ? 43 : $gsisdRealQty.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdOrigin = this.getGsisdOrigin();
        result = result * 59 + ($gsisdOrigin == null ? 43 : $gsisdOrigin.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdValidUntil = this.getGsisdValidUntil();
        result = result * 59 + ($gsisdValidUntil == null ? 43 : $gsisdValidUntil.hashCode());
        TableView<IncomeStatementDetailOutData> $tableView = this.getTableView();
        result = result * 59 + ($tableView == null ? 43 : $tableView.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdProId = this.getGsisdProId();
        result = result * 59 + ($gsisdProId == null ? 43 : $gsisdProId.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdProName = this.getGsisdProName();
        result = result * 59 + ($gsisdProName == null ? 43 : $gsisdProName.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdStockStatus = this.getGsisdStockStatus();
        result = result * 59 + ($gsisdStockStatus == null ? 43 : $gsisdStockStatus.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdFactory = this.getGsisdFactory();
        result = result * 59 + ($gsisdFactory == null ? 43 : $gsisdFactory.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdUnit = this.getGsisdUnit();
        result = result * 59 + ($gsisdUnit == null ? 43 : $gsisdUnit.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdIsCause = this.getGsisdIsCause();
        result = result * 59 + ($gsisdIsCause == null ? 43 : $gsisdIsCause.hashCode());
        TableColumn<IncomeStatementDetailOutData, String> $gsisdQty = this.getGsisdQty();
        result = result * 59 + ($gsisdQty == null ? 43 : $gsisdQty.hashCode());
        IncomeStatementController $incomeStatementController = this.getIncomeStatementController();
        result = result * 59 + ($incomeStatementController == null ? 43 : ($incomeStatementController).hashCode());
        ChooseProController $chooseProController = this.getChooseProController();
        result = result * 59 + ($chooseProController == null ? 43 : ($chooseProController).hashCode());
        ObservableList<IncomeStatementDetailOutData> $observableTableList = this.getObservableTableList();
        result = result * 59 + ($observableTableList == null ? 43 : $observableTableList.hashCode());
        return result;
    }

    public String toString() {
        return "AddIncomeStatementController(cancel=" + this.getCancel() + ", gsisdRetailPrice=" + this.getGsisdRetailPrice() + ", gsisdDosageForm=" + this.getGsisdDosageForm() + ", save=" + this.getSave() + ", gsisdBatch=" + this.getGsisdBatch() + ", remark=" + this.getRemark() + ", gsisdFormat=" + this.getGsisdFormat() + ", gsisdApprovalNum=" + this.getGsisdApprovalNum() + ", addBtn=" + this.getAddBtn() + ", isType=" + this.getIsType() + ", gsisdBatchNo=" + this.getGsisdBatchNo() + ", pane=" + this.getPane() + ", indexDetail=" + this.getIndexDetail() + ", gsisdRealQty=" + this.getGsisdRealQty() + ", gsisdOrigin=" + this.getGsisdOrigin() + ", gsisdValidUntil=" + this.getGsisdValidUntil() + ", tableView=" + this.getTableView() + ", gsisdProId=" + this.getGsisdProId() + ", gsisdProName=" + this.getGsisdProName() + ", gsisdStockStatus=" + this.getGsisdStockStatus() + ", gsisdFactory=" + this.getGsisdFactory() + ", gsisdUnit=" + this.getGsisdUnit() + ", gsisdIsCause=" + this.getGsisdIsCause() + ", gsisdQty=" + this.getGsisdQty() + ", incomeStatementController=" + this.getIncomeStatementController() + ", chooseProController=" + this.getChooseProController() + ", observableTableList=" + this.getObservableTableList() + ")";
    }
}

